package com.cj.ctyl.framework.config.interceptor;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author: Alex
 * @Description: 拦截器配置
 * @Date: 2021/8/14
 */
@Configuration
public class LoginConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new AdminInterceptor()).addPathPatterns("/**")
                .excludePathPatterns(
                        "/static/**",
                        "/login",
                        "/login.html",
                        "/doLogin",
                        "/kaptcha/**"
                );
    }
}
